package com.zjuee.base.dto.common.company;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.zjuee.base.base.Converter;
import com.zjuee.base.bean.Pages;
import com.zjuee.base.model.common.company.CompanyLicense;
import lombok.*;
import org.springframework.beans.BeanUtils;

import java.util.Date;

/**
 * @author wu liang
 * @since 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class CompanyLicenseDto extends CompanyLicense implements Converter<CompanyLicense,CompanyLicenseDto> {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Pages page;

    private String bciName;

    private Date Current;

    private String bciProvince;

    private String bciCity;

    private String bciArea;

    private String bciStreet;

    private Integer dateStatus;
    @Override
    public void convertToDo(CompanyLicense companyLicense) {
        BeanUtils.copyProperties(this,companyLicense);
    }

    @Override
    public CompanyLicenseDto convert(CompanyLicense companyLicense) {
        BeanUtils.copyProperties(companyLicense,this);
        return this;
    }
}
